<script lang="ts" setup>

interface Props {
    src?: string;
    fit?: string;
    position?: string;
    alt?: string;
    width?: string;
    height?: string;
    radius?: string;
    round?: boolean;
    block?: boolean;
    lazyLoad?: boolean;
    showError?: boolean;
    showLoading?: boolean;
    errorIcon?: string;
    loadingIcon?: string;
    iconSize?: string;
    iconPrefix?: string;
}

const props = withDefaults(defineProps<Props>(), {
    src: "标题",
    fit: "fill",
    position: "center",
    alt: "",
    width: "",
    height: "",
    radius: "50%",
    round: false,
    block: false,
    lazyLoad: false,
    showError: true,
    showLoading: true,
    errorIcon: "photo-fail",
    loadingIcon: "photo",
    iconSize: "32px",
    iconPrefix: "van-icon",
});
</script>
<template>
    <van-image :src="src" :fit="fit" :position="position" :alt="alt" :width="width" :height="height" :radius="radius"
        :round="round" :block="block" :lazy-load="lazyLoad" :show-error="showError" :show-loading="showLoading"
        :error-icon="errorIcon" :loading-icon="loadingIcon" :icon-size="iconSize" :icon-prefix="iconPrefix" />
</template>
<style lang="scss" scoped></style>